home *** CD-ROM | disk | FTP | other *** search
- DISASSEMBLER(3X) Last changed: 2-2-99
-
-
- NNAAMMEE
- ddiissaasssseemmbblleerr - Disassembles a MIPS instruction and prints the results
-
- SSYYNNOOPPSSIISS
- iinntt ddiissaasssseemmbblleerr ((_i_a_d_r, _r_e_g_s_t_y_l_e, _g_e_t__s_y_m_n_a_m_e, _g_e_t__r_e_g_v_a_l_u_e,,
- _g_e_t__b_y_t_e_s, _p_r_i_n_t__h_e_a_d_e_r)
- uunnssiiggnneedd _i_a_d_r;
- iinntt _r_e_g_s_t_y_l_e;
- cchhaarr **((**_g_e_t__s_y_m_n_a_m_e)();
- iinntt ((**_g_e_t__r_e_g_v_a_l_u_e)();
- lloonngg ((**_g_e_t__b_y_t_e_s)();
- vvooiidd ((**_p_r_i_n_t__h_e_a_d_e_r)();
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems (o32 ABI only)
-
- DDEESSCCRRIIPPTTIIOONN
- ddiissaasssseemmbblleerr disassembles and prints a MIPS machine instruction on
- ssttddoouutt. It accepts the following arguments:
-
- _i_a_d_r Specifies the instruction address to be disassembled.
-
- _r_e_g_s_t_y_l_e Specifies how registers are named in the disassembly; if the
- value is 0, compiler names are used; otherwise, hardware
- names are used.
-
- The next arguments are function pointers, most of which give the
- caller some flexibility in the appearance of the disassembly. The
- only function that must be provided is _g_e_t__b_y_t_e_s. All other functions
- are optional.
-
- _g_e_t__b_y_t_e_s
- This function is called with no arguments and returns the next
- byte(s) to disassemble.
-
- _g_e_t__s_y_m_n_a_m_e
- This function is passed an address, which is the target of a _j_a_l
- instruction. If NULL is returned or if _g_e_t__s_y_m_n_a_m_e is NULL, the
- ddiissaasssseemmbblleerr prints the address; otherwise, the string name is
- printed as returned from _g_e_t__s_y_m_n_a_m_e.
-
- _g_e_t__r_e_g_v_a_l_u_e
- If _g_e_t__r_e_g_v_a_l_u_e is not NULL, it is passed a register number and
- returns the current contents of the specified register.
- ddiissaasssseemmbblleerr prints this information along with the instruction
- disassembly.
-
- _p_r_i_n_t__h_e_a_d_e_r
- If _p_r_i_n_t__h_e_a_d_e_r is not NULL, it is passed the instruction address
- _i_a_d_r and the current instruction to be disassembled, which is the
- return value from _g_e_t__b_y_t_e_s. _p_r_i_n_t__h_e_a_d_e_r can use these
- parameters to print any desired information before the actual
- instruction disassembly is printed.
-
- If _g_e_t__b_y_t_e_s is NULL, the ddiissaasssseemmbblleerr returns -1 and errno is set to
- EEIINNVVAALL; otherwise, the number of bytes that were disassembled is
- returned. If the disassembled word is a jump or branch instruction,
- the instruction in the delay slot is also disassembled.
-
- The program must be loaded with the object file access routine library
- lliibbeellffuuttiill..aa.
-
- SSEEEE AALLSSOO
- llddffccnn(4)
-
- This man page is available only online.
-